package com.tk.exam.mapper;

import com.tk.exam.domain.TkRPaperQuestion;
import com.tk.exam.domain.TkRPaperQuestionExample;
import java.util.List;

import com.tk.exam.vo.paper.GetStuQAReq;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

public interface TkRPaperQuestionMapper {
    int countByExample(TkRPaperQuestionExample example);

    int deleteByExample(TkRPaperQuestionExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(TkRPaperQuestion record);

    int insertSelective(TkRPaperQuestion record);

    List<TkRPaperQuestion> selectByExampleWithRowbounds(TkRPaperQuestionExample example, RowBounds rowBounds);

    List<TkRPaperQuestion> selectByExample(TkRPaperQuestionExample example);

    TkRPaperQuestion selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") TkRPaperQuestion record, @Param("example") TkRPaperQuestionExample example);

    int updateByExample(@Param("record") TkRPaperQuestion record, @Param("example") TkRPaperQuestionExample example);

    int updateByPrimaryKeySelective(TkRPaperQuestion record);

    int updateByPrimaryKey(TkRPaperQuestion record);

    TkRPaperQuestion selectByPaperIdAndQuestionId(@Param("examPaperId") Integer examPaperId,@Param("questionId") Integer questionId);

    List<TkRPaperQuestion> selectByPaperId(Integer examPaperId);

    Integer countByExamId(Integer examId);

    void insertBatch(@Param("tkRPaperQuestions")List<TkRPaperQuestion> tkRPaperQuestions);

    Double searchQuestionsScoreByType(@Param("examId") Integer examId,@Param("type") Byte type);

    List<TkRPaperQuestion> getStuJudgeQAWithPage(@Param("examPaperId")  Integer examPaperId,@Param("questionType") byte questionType,@Param("stuId")Integer stuId,@Param("examInfoId")Integer examInfoId);

    List<TkRPaperQuestion> selectByPaperIdAndQuestionTypes(@Param("examPaperId") Integer examPaperId,@Param("questionTypes") List<Byte> questionTypes);

    Integer countByExamIdAndQuestionTypes(@Param("examId")Integer examId,@Param("questionTypes") List<Byte> questionTypes);
}